package com.sc.nft.enums;

public enum IntegralTaskEnum {
    //用户注册
    USER_REGIST(1L,"用户注册"),
    REAL_NAME(2L,"认证成功"),
    //首次消费
    FIRST_CONSUMPTION (3L,"首次消费"),
    CONSUMPTION_INTEGRAL(4L,"消费对应等比积分"),
    INVITE_NEW_USER (5L,"邀新好友送积分")
    ;



    private Long _code;
    private String _name;


    IntegralTaskEnum(Long code, String name) {
        this._code = code;
        this._name = name;
    }

    public Long getCode() {
        return _code;
    }

    public String getName() {
        return _name;
    }


    public static String getValue(Long code) {
        IntegralTaskEnum[] values = values();
        for (IntegralTaskEnum v : values) {
            if (v.getCode().equals(code)) {
                return v.getName();
            }
        }
        return null;
    }


    public static void main(String[] args) {
        System.out.println(getValue(2L));
    }
}
